package mest.service.Modeling.Impl;

import mest.dao.Modeling.ICustomerTypeDao;
import mest.entity.customer_type;
import mest.service.Modeling.ICustomerTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description
 * @auther Machenike
 * @create 2019-11-13 21:46
 */
@Service
public class CustomerTypeServiceImpl implements ICustomerTypeService {

    @Resource
    private ICustomerTypeDao ict;

    @Override
    public int insertCustomerType(customer_type ct) {
        try {
            return ict.insertCustomerType(ct);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return 0;
    }

    @Override
    public int selectCount() {
        return ict.selectCount();
    }

    @Override
    public List<customer_type> findCustomerTypePage(int index, int pageSize) {
        return ict.findCustomerTypePage((index-1)*pageSize,pageSize);
    }
}
